Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid AFN fan array bounds error #10636

Merged
merged 3 commits into from
Aug 15, 2024
Merged

Avoid AFN fan array bounds error #10636

merged 3 commits into from
Aug 15, 2024

Conversation

lgu1234
Copy link
Contributor

@lgu1234 lgu1234 commented Aug 1, 2024

Pull request overview

The logic of assign_fan_airloop function is not correct. After further testing, the function is not necessary. The get_airloop_number function covers the same functionality of assign_fan_airloop. Therefore, the assign_fan_airloop function is removed to avoid possible array bounds error. No differences are found in local testing.

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@lgu1234 lgu1234 added the Defect Includes code to repair a defect in EnergyPlus label Aug 1, 2024
@lgu1234
Copy link
Contributor Author

lgu1234 commented Aug 1, 2024

@mjwitte The above check-in is for testing only to see any possible differences after a function is removed.

@Myoldmopar
Copy link
Member

@mjwitte The above check-in is for testing only to see any possible differences after a function is removed.

I'm a little confused @lgu1234. Is this PR just for testing then?

@lgu1234
Copy link
Contributor Author

lgu1234 commented Aug 10, 2024

@Myoldmopar Sorry, I may not explain my actions clearly to cause your confusion. This PR is to avoid array bounds error. When @mjwitte posted this issue, he found AirLoopNum is not assigned correctly in the assign_fan_airloop function. Then I check the function and found that the logic in the function is not correct for multiple AirLoops. Fortunately, get_airloop_number function covers the same functionality, so that assign_fan_airloop function is not needed. That is why I removed the function to see if there are any differences in CI testing. The results show no differences, so that the function removal is correct.

Although I assume array bounds errors are removed. Hope @mjwitte can test it.

The error file also shows a fatal error because AFN model is unable to find a solution. Further investigation may be needed.

Copy link
Contributor

@mjwitte mjwitte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I tested this with the defect files from both #10630 and #7871 (which is what prompted adding this function the first place). Something must have changed since then (4 yrs ago) that make this function moot. Thanks @lgu1234 I will update this branch and let CI run one more time.

@mjwitte
Copy link
Contributor

mjwitte commented Aug 15, 2024

All green, no diffs. Merging.

@mjwitte mjwitte merged commit ff364d3 into develop Aug 15, 2024
15 checks passed
@mjwitte mjwitte deleted the 10630-AFN-fan-array-bounds branch August 15, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AFN fan array bounds error with multiple airloops
8 participants